import { Type } from "../../../../../Decorator/Decorator";
import { Session } from "./Session";

export interface MessageClassConstructor {
    new(): any;
}
export interface IMHandler {
    SetupMessageType(value: MessageClassConstructor): void;
    SetupResponseType(value: MessageClassConstructor): void;

    Handle(session: Session, message: Object): void;
    GetMessageType(): Type;
    GetResponseType(): Type;
}

export class IMHandler {

    _MessageType: MessageClassConstructor = null;
    _ResposeType: MessageClassConstructor = null;

    SetupMessageType(value: MessageClassConstructor): void {
        this._MessageType = value;
    }

    SetupResponseType(value: MessageClassConstructor): void {
        this._ResposeType = value;
    }

    Handle(session: Session, message: Object): void {

    }

    GetMessageType(): Type {
        return null;
    }

    GetResponseType(): Type {
        return null;
    }

}